/*
 * @Description:
 * @version:
 * @Author: 尹鹏孝
 * @Date: 2023-03-15 13:30:54
 * @LastEditors: 尹鹏孝
 * @LastEditTime: 2023-03-16 09:33:40
 */
'use static'
const Router = require('koa-router');
const controllers = require('../controller/index')
const jwt = require('../middlewares/jwt')
const pubicRouter = new Router();
pubicRouter.prefix('/api')
pubicRouter.post('/user/login', controllers.userController.login)
pubicRouter.post('/user/registry', controllers.userController.registry)
const privateRouter = new Router()

privateRouter.prefix('/api')
privateRouter.use(jwt.verifyToken)
privateRouter.get('/user/list', controllers.userController.getUserList)
privateRouter.get('/user/list/:id', controllers.userController.getUserInfoMe)

module.exports={
    pubicRouter,privateRouter
}